package com.study.service;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Mylog {
    private static int count=0;
    public void log(){
        count++;
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println("使用时间: "+sdf.format(new Date()));
        System.out.println("您以调用本接口"+count+"次");
    }

    public static void main(String[] args) {
        count++;
        Mylog m =new Mylog();
        m.log();
    }
}
